Optimal. Leaf size=297 \[ -\frac {(283 A-163 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(A-B) \sin (c+d x)}{4 d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{5/2}}-\frac {(21 A-13 B) \sin (c+d x)}{16 a d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(157 A-85 B) \sin (c+d x)}{80 a^2 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {(787 A-475 B) \sin (c+d x)}{240 a^2 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {(2671 A-1495 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{240 a^2 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.61, antiderivative size = 297, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4105, 4107,
4098, 3893, 212} \begin {gather*} -\frac {(283 A-163 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(157 A-85 B) \sin (c+d x)}{80 a^2 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a \sec (c+d x)+a}}+\frac {(2671 A-1495 B) \sin (c+d x) \sqrt {\sec (c+d x)}}{240 a^2 d \sqrt {a \sec (c+d x)+a}}-\frac {(787 A-475 B) \sin (c+d x)}{240 a^2 d \sqrt {\sec (c+d x)} \sqrt {a \sec (c+d x)+a}}-\frac {(21 A-13 B) \sin (c+d x)}{16 a d \sec ^{\frac {3}{2}}(c+d x) (a \sec (c+d x)+a)^{3/2}}-\frac {(A-B) \sin (c+d x)}{4 d \sec ^{\frac {3}{2}}(c+d x) (a \sec (c+d x)+a)^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3893
Rule 4098
Rule 4105
Rule 4107
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+a \sec (c+d x))^{5/2}} \, dx &=-\frac {(A-B) \sin (c+d x)}{4 d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{5/2}}+\frac {\int \frac {\frac {1}{2} a (13 A-5 B)-4 a (A-B) \sec (c+d x)}{\sec ^{\frac {5}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=-\frac {(A-B) \sin (c+d x)}{4 d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{5/2}}-\frac {(21 A-13 B) \sin (c+d x)}{16 a d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {\int \frac {\frac {1}{4} a^2 (157 A-85 B)-\frac {3}{2} a^2 (21 A-13 B) \sec (c+d x)}{\sec ^{\frac {5}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx}{8 a^4}\\ &=-\frac {(A-B) \sin (c+d x)}{4 d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{5/2}}-\frac {(21 A-13 B) \sin (c+d x)}{16 a d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(157 A-85 B) \sin (c+d x)}{80 a^2 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}+\frac {\int \frac {-\frac {1}{8} a^3 (787 A-475 B)+\frac {1}{2} a^3 (157 A-85 B) \sec (c+d x)}{\sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}} \, dx}{20 a^5}\\ &=-\frac {(A-B) \sin (c+d x)}{4 d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{5/2}}-\frac {(21 A-13 B) \sin (c+d x)}{16 a d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(157 A-85 B) \sin (c+d x)}{80 a^2 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {(787 A-475 B) \sin (c+d x)}{240 a^2 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {\int \frac {\frac {1}{16} a^4 (2671 A-1495 B)-\frac {1}{8} a^4 (787 A-475 B) \sec (c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx}{30 a^6}\\ &=-\frac {(A-B) \sin (c+d x)}{4 d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{5/2}}-\frac {(21 A-13 B) \sin (c+d x)}{16 a d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(157 A-85 B) \sin (c+d x)}{80 a^2 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {(787 A-475 B) \sin (c+d x)}{240 a^2 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {(2671 A-1495 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{240 a^2 d \sqrt {a+a \sec (c+d x)}}-\frac {(283 A-163 B) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx}{32 a^2}\\ &=-\frac {(A-B) \sin (c+d x)}{4 d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{5/2}}-\frac {(21 A-13 B) \sin (c+d x)}{16 a d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(157 A-85 B) \sin (c+d x)}{80 a^2 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {(787 A-475 B) \sin (c+d x)}{240 a^2 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {(2671 A-1495 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{240 a^2 d \sqrt {a+a \sec (c+d x)}}+\frac {(283 A-163 B) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{16 a^2 d}\\ &=-\frac {(283 A-163 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}-\frac {(A-B) \sin (c+d x)}{4 d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{5/2}}-\frac {(21 A-13 B) \sin (c+d x)}{16 a d \sec ^{\frac {3}{2}}(c+d x) (a+a \sec (c+d x))^{3/2}}+\frac {(157 A-85 B) \sin (c+d x)}{80 a^2 d \sec ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)}}-\frac {(787 A-475 B) \sin (c+d x)}{240 a^2 d \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {(2671 A-1495 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{240 a^2 d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.24, size = 196, normalized size = 0.66 \begin {gather*} \frac {\sec ^2(c+d x) \left ((3491 A-1895 B+5 (887 A-479 B) \cos (c+d x)+16 (52 A-25 B) \cos (2 (c+d x))-40 A \cos (3 (c+d x))+40 B \cos (3 (c+d x))+12 A \cos (4 (c+d x))) \sqrt {\sec (c+d x)} \sin (c+d x)+\frac {30 \sqrt {2} (283 A-163 B) \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) \cos ^4\left (\frac {1}{2} (c+d x)\right ) \tan (c+d x)}{\sqrt {1-\sec (c+d x)}}\right )}{240 d (a (1+\sec (c+d x)))^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 7.89, size = 471, normalized size = 1.59
method | result | size |
default | \(\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (-1+\cos \left (d x +c \right )\right )^{2} \left (4245 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-192 A \left (\cos ^{5}\left (d x +c \right )\right )-2445 B \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+8490 A \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right ) \cos \left (d x +c \right )+512 A \left (\cos ^{4}\left (d x +c \right )\right )-4890 B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right ) \cos \left (d x +c \right )-320 B \left (\cos ^{4}\left (d x +c \right )\right )+4245 \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, A \sin \left (d x +c \right )-3456 A \left (\cos ^{3}\left (d x +c \right )\right )-2445 \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, B \sin \left (d x +c \right )+1920 B \left (\cos ^{3}\left (d x +c \right )\right )-5974 A \left (\cos ^{2}\left (d x +c \right )\right )+3430 B \left (\cos ^{2}\left (d x +c \right )\right )+3768 A \cos \left (d x +c \right )-2040 B \cos \left (d x +c \right )+5342 A -2990 B \right ) \left (\cos ^{3}\left (d x +c \right )\right ) \left (\frac {1}{\cos \left (d x +c \right )}\right )^{\frac {5}{2}}}{480 d \sin \left (d x +c \right )^{5} a^{3}}\) | \(471\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 387118 vs.
\(2 (254) = 508\).
time = 8.84, size = 387118, normalized size = 1303.43 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.36, size = 592, normalized size = 1.99 \begin {gather*} \left [-\frac {15 \, \sqrt {2} {\left ({\left (283 \, A - 163 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (283 \, A - 163 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (283 \, A - 163 \, B\right )} \cos \left (d x + c\right ) + 283 \, A - 163 \, B\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {2} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - \frac {4 \, {\left (96 \, A \cos \left (d x + c\right )^{5} - 160 \, {\left (A - B\right )} \cos \left (d x + c\right )^{4} + 32 \, {\left (49 \, A - 25 \, B\right )} \cos \left (d x + c\right )^{3} + 5 \, {\left (911 \, A - 503 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (2671 \, A - 1495 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{960 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}, \frac {15 \, \sqrt {2} {\left ({\left (283 \, A - 163 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (283 \, A - 163 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (283 \, A - 163 \, B\right )} \cos \left (d x + c\right ) + 283 \, A - 163 \, B\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )}}{a \sin \left (d x + c\right )}\right ) + \frac {2 \, {\left (96 \, A \cos \left (d x + c\right )^{5} - 160 \, {\left (A - B\right )} \cos \left (d x + c\right )^{4} + 32 \, {\left (49 \, A - 25 \, B\right )} \cos \left (d x + c\right )^{3} + 5 \, {\left (911 \, A - 503 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (2671 \, A - 1495 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{480 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2}\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________